import Layout from '@/views/layout/Layout'

export default [
  {
    path: '/mall',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'mallManage',
    meta: {
      title: '商铺中心',
      icon: 'chart'
    },
    children: [
      // {
      //   path: 'store',
      //   component: () => import('@/views/viewStore/index'),
      //   name: 'store',
      //   meta: {
      //     title: '店铺管理',
      //     perms: ['GET /admin/store/list', 'POST /admin/store/create', 'GET /admin/store/read', 'POST /admin/store/update', 'POST /admin/store/delete'],
      //     noCache: true
      //   }
      // },
      {
        path: 'brand',
        component: () => import('@/views/mall/brand'),
        name: 'brand',
        meta: {
          perms: ['GET /admin/brand/list', 'POST /admin/brand/create', 'GET /admin/brand/read', 'POST /admin/brand/update', 'POST /admin/brand/delete'],
          title: '品牌制造商',
          noCache: true
        }
      },
      {
        path: 'category',
        component: () => import('@/views/mall/category'),
        name: 'category',
        meta: {
          perms: ['GET /admin/category/list', 'POST /admin/category/create', 'GET /admin/category/read', 'POST /admin/category/update', 'POST /admin/category/delete'],
          title: '商品类目',
          noCache: true
        }
      },
      {
        path: 'order',
        component: () => import('@/views/mall/order'),
        name: 'order',
        meta: {
          perms: ['GET /admin/order/list', 'GET /admin/order/submit', 'POST /admin/order/ordership', 'POST /admin/order/orderrefund', 'POST /admin/order/orderreply'],
          title: '订单管理',
          noCache: true
        }
      },
      {
        path: 'issue',
        component: () => import('@/views/mall/issue'),
        name: 'issue',
        meta: {
          perms: ['GET /admin/issue/list', 'POST /admin/issue/create', 'GET /admin/issue/read', 'POST /admin/issue/update', 'POST /admin/issue/delete'],
          title: '通用问题',
          noCache: true
        }
      },
      {
        path: 'supermarket',
        component: () => import('@/views/common/commonModel'),
        meta: {
          title: '商超信息管理',
          noCache: true
        }
      },
      {
        path: 'integral-goods',
        component: () => import('@/views/common/commonModel'),
        meta: {
          title: '积分商城管理',
          noCache: true
        }
      }
    ]
  },
  {
    path: '/goods',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'goodsManage',
    meta: {
      title: '商品管理',
      icon: 'chart'
    },
    children: [
      // {
      //   path: 'list',
      //   component: () => import('@/views/mall/goods/list'),
      //   name: 'goodsList',
      //   meta: {
      //     perms: ['GET /admin/goods/list', 'POST /admin/goods/delete'],
      //     title: '商品列表',
      //     noCache: true
      //   }
      // },
      {
        path: 'list1',
        component: () => import('@/views/mall/goods/list'),
        meta: {
          title: '商标服务列表',
          noCache: true
        }
      },
      {
        path: 'list2',
        component: () => import('@/views/mall/goods/list'),
        meta: {
          title: '专利服务列表',
          noCache: true
        }
      },
      {
        path: 'list3',
        component: () => import('@/views/mall/goods/list'),
        meta: {
          title: '版权服务列表',
          noCache: true
        }
      },
      {
        path: '/trademark/library',
        component: () => import('@/views/common/commonModel/index'),
        meta: {
          title: '商标数据库',
          noCache: true
        }
      },
      // {
      //   path: 'list4',
      //   component: () => import('@/views/mall/goods/list'),
      //   name: 'goodsList',
      //   query: { type: 4 },
      //   meta: {
      //     title: '商标列表',
      //     noCache: true
      //   }
      // },
      {
        path: 'create',
        component: () => import('@/views/mall/goods/create'),
        name: 'goodsCreate',
        meta: {
          perms: ['POST /admin/goods/create'],
          title: '商品上架',
          noCache: true
        }
      },
      {
        path: 'edit',
        component: () => import('@/views/mall/goods/edit'),
        name: 'goodsEdit',
        meta: {
          perms: ['GET /admin/goods/submit', 'POST /admin/goods/update', 'POST /admin/goods/catAndBrand'],
          title: '商品编辑',
          noCache: true
        },
        hidden: true
      },
      {
        path: 'comment',
        component: () => import('@/views/mall/goods/comment'),
        name: 'goodsComment',
        meta: {
          perms: ['GET /admin/comment/list', 'POST /admin/comment/delete'],
          title: '商品评论',
          noCache: true
        }
      }
    ]
  }
  // {
  //   path: '/mall_manager',
  //   component: Layout,
  //   alwaysShow: true,
  //   meta: {
  //     title: '商家管理',
  //     icon: 'chart'
  //   },
  //   children: [
  //     {
  //       path: 'adminUser',
  //       component: () => import('@/views/sys/adminUser'),
  //       name: 'adminUser',
  //       meta: {
  //         title: '商家用户',
  //         noCache: true
  //       }
  //     }
  //   ]
  // }
]
